﻿using Microsoft.Xna.Framework;
using Microsoft.Xna.Framework.Content;
using Microsoft.Xna.Framework.Graphics;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace BeatingMole
{
    /// <summary>
    /// Nguyễn Đặng Anh Duy
    /// MSSV : 11100204
    /// Email : itc.anhduy@gmail.com
    /// <summary>
    class CInfoSettings
    {
        #region "Variable"
        private Texture2D _bgSettings;
        private ContentManager _Content;
        private SpriteFont _spriteFontSettings;
        private Texture2D _buttonSettings;
        private Dictionary<string, Rectangle> _xmlButtonSettings;
        private Rectangle _recButtonOn;
        private Rectangle _recButtonSoundEffectOn;
        private Texture2D _btnSaveSettings;
        private Rectangle _recBtnSaveSettings;
        private Texture2D _btnBackMenu;
        private Rectangle _recBtnBackMenu;
        private Texture2D _bgSaveSettings;
        private Texture2D _blackBacground;
        #endregion

        #region "Volume"
        private Texture2D _barVolume;
        private Texture2D _plus;
        private Texture2D _except;
        private Rectangle _recPlus;
        private Rectangle _recExcept;
        #endregion

        #region "Brightness"
        private Texture2D _barBrightness;
        private Texture2D _plusB;
        private Texture2D _exceptB;
        private Rectangle _recPlusB;
        private Rectangle _recExceptB;
        #endregion

        #region "SoundEffect"
        private Texture2D _barSoundEffect;
        private Texture2D _plusSoundEffect;
        private Texture2D _exceptSoundEffect;
        private Rectangle _recPlusSoundEffect;
        private Rectangle _recExceptSoundEffect;
        #endregion
        #region "Properties"


        #region Brightness
        public Texture2D BlackBacground
        {
            set { _blackBacground = value; }
            get { return _blackBacground; }
        }
        public Texture2D BgSaveSettings
        {
            set { _bgSaveSettings = value; }
            get { return _bgSaveSettings; }
        }
        public Texture2D BtnBackMenu
        {
            set { _btnBackMenu = value; }
            get { return _btnBackMenu; }
        }
        public Rectangle RecBtnBackMenu
        {
            set { _recBtnBackMenu = value; }
            get { return _recBtnBackMenu; }
        }
        public Texture2D BarBrightness
        {
            set { _barBrightness = value; }
            get { return _barBrightness; }
        }
        public Texture2D PlusB
        {
            set { _plusB = value; }
            get { return _plusB; }
        }
        public Texture2D ExceptB
        {
            set { _exceptB = value; }
            get { return _exceptB; }
        }
        public Rectangle RecPlusB
        {
            set { _recPlusB = value; }
            get { return _recPlusB; }
        }
        public Rectangle RecExceptB
        {
            set { _recExceptB = value; }
            get { return _recExceptB; }
        }
        #endregion


        #region Volume
        public Texture2D BarVolume
        {
            set { _barVolume = value; }
            get { return _barVolume; }
        }
        public Texture2D Plus
        {
            set { _plus = value; }
            get { return _plus; }
        }
        public Texture2D Except
        {
            set { _except = value; }
            get { return _except; }
        }
        public Rectangle RecPlus
        {
            set { _recPlus = value; }
            get { return _recPlus; }
        }
        public Rectangle RecExcept
        {
            set { _recExcept = value; }
            get { return _recExcept; }
        }
        #endregion
        #region SoundEffect
        public Texture2D BarSoundEffect
        {
            set { _barSoundEffect = value; }
            get { return _barSoundEffect; }
        }
        public Texture2D PlusSoundEffect
        {
            set { _plusSoundEffect = value; }
            get { return _plusSoundEffect; }
        }
        public Texture2D ExceptSoundEffect
        {
            set { _exceptSoundEffect = value; }
            get { return _exceptSoundEffect; }
        }
        public Rectangle RecPlusSoundEffect
        {
            set { _recPlusSoundEffect = value; }
            get { return _recPlusSoundEffect; }
        }
        public Rectangle RecExceptSoundEffect
        {
            set { _recExceptSoundEffect = value; }
            get { return _recExceptSoundEffect; }
        }
        #endregion
        public Rectangle RecButtonSoundEffectOn
        {
            set { _recButtonSoundEffectOn = value; }
            get { return _recButtonSoundEffectOn; }
        }
        public Rectangle RecButtonOn
        {
            set { _recButtonOn = value; }
            get { return _recButtonOn; }
        }
        public Texture2D ButtonSettings
        {
            set { _buttonSettings = value; }
            get { return _buttonSettings; }
        }
        public Dictionary<string, Rectangle> XmlButtonSettings
        {
            set { _xmlButtonSettings = value; }
            get { return _xmlButtonSettings; }
        }
        public SpriteFont SpriteFontSettings
        {
            set { _spriteFontSettings = value; }
            get { return _spriteFontSettings; }
        }
        public Texture2D BgSettings
        {
            set { _bgSettings = value; }
            get { return _bgSettings; }
        }
        public Texture2D BtnSaveSettings
        {
            set { _btnSaveSettings = value; }
            get { return _btnSaveSettings; }
        }
        public Rectangle RecBtnSaveSettings
        {
            set { _recBtnSaveSettings = value; }
            get { return _recBtnSaveSettings; }
        }
        #endregion

    

        #region "Constructor"
        public CInfoSettings(ContentManager content)
        {
            _Content = content;
            ButtonSettings = _Content.Load<Texture2D>("Resource/Buttons/OthersItems");
            XmlButtonSettings = _Content.Load<Dictionary<string, Rectangle>>("Resource/Xml/OthersItems");
            BgSettings = _Content.Load<Texture2D>(@"Resource/Menu/Settings/Settings");
            SpriteFontSettings = _Content.Load<SpriteFont>(@"Resource/Font/Settings");
            RecButtonOn = new Rectangle(375, 105, XmlButtonSettings["no"].Width, XmlButtonSettings["no"].Height);
            RecButtonSoundEffectOn = new Rectangle(450, 330, XmlButtonSettings["no"].Width, XmlButtonSettings["no"].Height);
            
            
            #region Volumne
            Plus = _Content.Load<Texture2D>(@"Resource/Menu/Settings/plus");
            Except = _Content.Load<Texture2D>(@"Resource/Menu/Settings/except");
            BarVolume = _Content.Load<Texture2D>(@"Resource/Menu/Settings/barvolume");
            RecPlus = new Rectangle(640, 175, Plus.Width, Plus.Height);
            RecExcept = new Rectangle(375, 175, Except.Width, Except.Height);
            #endregion

            #region Brightness
            PlusB = _Content.Load<Texture2D>(@"Resource/Menu/Settings/plus");
            ExceptB = _Content.Load<Texture2D>(@"Resource/Menu/Settings/except");
            BarBrightness = _Content.Load<Texture2D>(@"Resource/Menu/Settings/barvolume");
            RecPlusB = new Rectangle(640, 250, PlusB.Width, PlusB.Height);
            RecExceptB = new Rectangle(375, 250, ExceptB.Width, ExceptB.Height);
            #endregion

            #region SoundEffect
            PlusSoundEffect = _Content.Load<Texture2D>(@"Resource/Menu/Settings/plus");
            ExceptSoundEffect = _Content.Load<Texture2D>(@"Resource/Menu/Settings/except");
            BarSoundEffect = _Content.Load<Texture2D>(@"Resource/Menu/Settings/barvolume");
            RecPlusSoundEffect = new Rectangle(640, 400, PlusSoundEffect.Width, PlusSoundEffect.Height);
            RecExceptSoundEffect = new Rectangle(375, 400, ExceptSoundEffect.Width, ExceptSoundEffect.Height);
            #endregion

            BtnSaveSettings = _Content.Load<Texture2D>(@"Resource/Menu/Settings/Save");
            BtnBackMenu = _Content.Load<Texture2D>(@"Resource/Menu/Settings/backmenu");
            RecBtnSaveSettings = new Rectangle(550, 20, BtnSaveSettings.Width, BtnSaveSettings.Height);
            RecBtnBackMenu = new Rectangle(625, 20, BtnBackMenu.Width, BtnBackMenu.Height);

            BgSaveSettings = _Content.Load<Texture2D>(@"Resource/Maps/BeatingMouseSaveSettings");
            BlackBacground = _Content.Load<Texture2D>(@"Resource/Maps/Pause");

        }
        #endregion
    }
}
